class User():
	
	'''人物类'''
		
	def __init__(self,first_name,last_name):
		self.first_name=first_name
		self.last_name=last_name
		self.login_attempts = 0
		
	def describe_user(self):
		long_name=self.first_name+self.last_name
		print('名字是：'+long_name)
	
	def greet_user(self):
		print(self.first_name+self.last_name+'你想吃啥？')
		
	def incrment_login_attempts(self):
		self.login_attempts += 1
	
	def rest_login_attempts(self):
		self.login_attempts = 0

#注意：调用方法加() 调用属性不加()
new_user=User('小','狗蛋')
new_user.describe_user()
new_user.greet_user()

new_user.incrment_login_attempts()
new_user.incrment_login_attempts()
new_user.incrment_login_attempts()
new_user.incrment_login_attempts()
new_user.rest_login_attempts()
print(new_user.login_attempts)

